package com.mune.gulimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mune.common.to.SkuHasStockVo;
import com.mune.common.to.mq.StockLockedTo;
import com.mune.common.to.order.OrderTo;
import com.mune.common.utils.PageUtils;
import com.mune.gulimall.ware.entity.WareSkuEntity;
import com.mune.gulimall.ware.vo.LockStockResultVo;
import com.mune.gulimall.ware.vo.WareSkuLockVo;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author mune
 * @email 1356008591@qq.com
 * @date 2020-07-29 10:38:12
 */
public interface WareSkuService extends IService<WareSkuEntity> {

  PageUtils queryPage(Map<String, Object> params);

  void addStock(Long skuId, Long wareId, Integer skuNum);

  List<SkuHasStockVo> getSkusHasStock(List<Long> skuIds);

  Boolean orderLockStock(WareSkuLockVo vo);

  boolean handleOrderStockRelease(StockLockedTo stockLockedTo);

  void handleOrderCloseRelease(OrderTo orderTo);
}

